package com.tkc.converter;

import com.tkc.controller.model.param.TeacherParam;
import com.tkc.service.model.dto.TeacherDTO;

/**
 * 
 * @Function: 用于controller层到service层对象数据的转换
 * 
 * @Project :assessmenttask 
 * @Package :com.tkc.converter 
 * @File :ParamConvertToDTO.java 
 * @ClassName: ParamConvertToDTO  
 * 
 * @author tankaichao 
 * @email cgztkc@126.com 
 * @Date 2016年8月9日下午6:13:50
 * @since JDK 1.8 
 *
 */
public class ParamConvertToDTO {

	public static TeacherDTO convertFromTeacherParamToTeacherDTO(TeacherParam teacherParam) {
		TeacherDTO teacherDTO = new TeacherDTO();
		teacherDTO.setId(teacherParam.getId());
		teacherDTO.setName(teacherParam.getName());
		teacherDTO.setPassword(teacherParam.getPassword());
		teacherDTO.setSex(teacherParam.getSex());
		teacherDTO.setDesc(teacherParam.getDesc());
		teacherDTO.setPicUrl(teacherParam.getPicUrl());
		teacherDTO.setSchoolName(teacherParam.getSchoolName());
		teacherDTO.setRegistDate(teacherParam.getRegistDate());
		teacherDTO.setRemark(teacherParam.getRemark());
		return teacherDTO;
	}
}
